from django.db import models

# Create your models here.
class Students(models.Model):
    sex_choice = (
        (0,'女'),
        (1,'男')
    )
    name = models.CharField(max_length=30,verbose_name='姓名')#自动生成的admin系统显示的字段内容（给字段属性命名）
    age = models.IntegerField(verbose_name='年龄',null=True,blank=True)
    sex = models.IntegerField(verbose_name='性别',null=True,blank=True,choices=sex_choice)
    create_time = models.DateTimeField(auto_now_add=True,verbose_name='创建时间')
    update_time = models.DateTimeField(auto_now=True,verbose_name='更新时间')
    is_delete = models.BooleanField(default=False,verbose_name='逻辑删除')
